const webpack = require('webpack')

module.exports = {
  // entry: {
  //   app: ["babel-polyfill", "./src/main.js"]
  // },
  devServer: {
    port: 6001,
    disableHostCheck: true,
    proxy: {
      '': {
        target: 'http://192.168.18.204:8080', // 后端接口域名
        changeOrigin: true, // 是否跨域
        ws: false, // 是否要websockets代理
        pathRewrite: {}
      }
    }
  },
  configureWebpack: config => {
    config.entry.app = ["classlist-polyfill", "babel-polyfill", "./src/main.js"];
    // 导入jquery
    config.plugins.push(
      new webpack.ProvidePlugin({
        jQuery: 'jquery',
        $: 'jquery'
      })
    )
  }
}
